dojo.declare("DVendorAccountNewPg", wm.Page, {
start: function() {
//  var mainPage = wm.Page.getPage("MobileMainPg");
//  this.lvVendor.filter.setValue("customerId", mainPage.vUserId);
this.lvVendor.update();
// this.projectLookup1.setReadonly(true);
//this.emailEditor.setReadonly(true);
},
"preferredDevice": "desktop",
customerSaveButtonClick: function(inSender) {
var shopTime1;
var shopTime2;
var openHr = this.optionTimeHour.dataValue;
var openMin = this.optionTimeMin.dataValue;
var openAmPm = this.option.dataValue;
var openTime = true;
var closeHr = this.optionTimeHour1.dataValue;
var closeMin = this.optionTimeMin1.dataValue;
var closeAmPm = this.option1.dataValue;
var closeTime = true;
var timeflag = false;
if (openHr || openMin || openAmPm) {
timeflag = true;
if (!openHr || !openMin || !openAmPm) {
openTime = false;
} else {
shopTime1 = openHr + ":" + openMin + " " + openAmPm;
}
closeTime = false;
}
if (closeHr || closeMin || closeAmPm) {
if (!closeHr || !closeMin || !closeAmPm) {
closeTime = false;
} else {
closeTime = true;
shopTime1 = shopTime1 + "," + closeHr + ":" + closeMin + " " + closeAmPm;
}
if (!timeflag) {
openTime = false;
}
}
var openHr1 = this.optionTimeHour2.dataValue;
var openMin1 = this.optionTimeMin2.dataValue;
var openAmPm1 = this.option2.dataValue;
var openTime1 = true;
var closeHr1 = this.optionTimeHour3.dataValue;
var closeMin1 = this.optionTimeMin3.dataValue;
var closeAmPm1 = this.option3.dataValue;
var closeTime1 = true;
var timeflag1 = false;
if (openHr1 || openMin1 || openAmPm1) {
timeflag1 = true;
if (!openHr1 || !openMin1 || !openAmPm1) {
openTime1 = false;
} else {
shopTime2 = openHr1 + ":" + openMin1 + " " + openAmPm1;
}
closeTime1 = false;
}
if (closeHr1 || closeMin1 || closeAmPm1) {
if (!closeHr1 || !closeMin1 || !closeAmPm1) {
closeTime1 = false;
} else {
closeTime1 = true;
shopTime2 = shopTime2 + "," + closeHr1 + ":" + closeMin1 + " " + closeAmPm1;
}
if (!timeflag1) {
openTime1 = false;
}
}
if ((openTime && closeTime) && (openTime1 && closeTime1)) {
if (timeflag && timeflag1) {
shopTime1 = shopTime1 + ";" + shopTime2;
} else if (timeflag1) {
shopTime1 = shopTime2;
}
// alert(shopTime1);
this.shopTimeTxt.setDataValue(shopTime1);
this.liveForm1EditPanel.saveData();
}
else {
// app.toastWarning("Please Enter Valid Timing", 4000);
this.ncShopTime.update();
}
},
customerUpdateButtonClick: function(inSender) {
this.optionTimeHour.setDataValue("");
this.optionTimeMin.setDataValue("");
this.option.setDataValue("");
this.optionTimeHour1.setDataValue("");
this.optionTimeMin1.setDataValue("");
this.option1.setDataValue("");
this.optionTimeHour2.setDataValue("");
this.optionTimeMin2.setDataValue("");
this.option2.setDataValue("");
this.optionTimeHour3.setDataValue("");
this.optionTimeMin3.setDataValue("");
this.option3.setDataValue("");
},
updateButton1Click1: function(inSender) {
this.projectLookup1.setReadonly(true);
this.emailEditor1.setReadonly(true);
},
_end: 0
});

DVendorAccountNewPg.widgets = {
lvVendor: ["wm.LiveVariable", {"autoUpdate":false,"inFlightBehavior":"executeLast","startUpdate":false,"type":"com.servicelivedb.data.Customer"}, {}, {
liveView: ["wm.LiveView", {"dataType":"com.servicelivedb.data.Customer","view":[
{"caption":"CustomerId","sortable":true,"dataIndex":"customerId","type":"java.lang.Integer","displayType":"Number","required":true,"readonly":true,"includeLists":true,"includeForms":true,"order":1000,"subType":null,"widthUnits":"px"},
{"caption":"Address","sortable":true,"dataIndex":"address","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":1001,"subType":null,"widthUnits":"px"},
{"caption":"Email","sortable":true,"dataIndex":"email","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":1002,"subType":null,"widthUnits":"px"},
{"caption":"UpdatedDt","sortable":true,"dataIndex":"updatedDt","type":"java.util.Date","displayType":"Date","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":1003,"subType":null,"widthUnits":"px"},
{"caption":"UpdatedBy","sortable":true,"dataIndex":"updatedBy","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":1004,"subType":null,"widthUnits":"px"},
{"caption":"Active","sortable":true,"dataIndex":"active","type":"java.lang.Boolean","displayType":"CheckBox","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":1005,"subType":null,"widthUnits":"px"},
{"caption":"Password","sortable":true,"dataIndex":"password","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":1006,"subType":null,"widthUnits":"px"},
{"caption":"Username","sortable":true,"dataIndex":"username","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":1007,"subType":null,"widthUnits":"px"},
{"caption":"Name","sortable":true,"dataIndex":"name","type":"java.lang.String","displayType":"Text","required":true,"readonly":false,"includeLists":true,"includeForms":true,"order":1008,"subType":null,"widthUnits":"px"},
{"caption":"PrimaryPhone","sortable":true,"dataIndex":"primaryPhone","type":"java.lang.String","displayType":"Text","required":true,"readonly":false,"includeLists":true,"includeForms":true,"order":1009,"subType":null,"widthUnits":"px"},
{"caption":"SecondaryPhone","sortable":true,"dataIndex":"secondaryPhone","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":1010,"subType":null,"widthUnits":"px"},
{"caption":"Type","sortable":true,"dataIndex":"type","type":"java.lang.String","displayType":"Text","required":true,"readonly":false,"includeLists":true,"includeForms":true,"order":1011,"subType":null,"widthUnits":"px"},
{"caption":"AlternateContact","sortable":true,"dataIndex":"alternateContact","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":1012,"subType":null,"widthUnits":"px"},
{"caption":"Pto","sortable":true,"dataIndex":"pto","type":"java.lang.Boolean","displayType":"CheckBox","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":1013,"subType":null,"widthUnits":"px"},
{"caption":"PtoMessage","sortable":true,"dataIndex":"ptoMessage","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":1014,"subType":null,"widthUnits":"px"},
{"caption":"Vendor_msg","sortable":true,"dataIndex":"vendor_msg","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":1015,"subType":null,"widthUnits":"px"},
{"caption":"Min_order_amount","sortable":true,"dataIndex":"min_order_amount","type":"java.lang.Integer","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":1016,"subType":null,"widthUnits":"px"},
{"caption":"Shop_time","sortable":true,"dataIndex":"shop_time","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":1017,"subType":null,"widthUnits":"px"}
]}, {}],
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"[main].lvLoggedCustomer.customerId","targetProperty":"filter.customerId"}, {}]
}]
}],
ncShopTime: ["wm.NotificationCall", {"operation":"toast"}, {}, {
input: ["wm.ServiceInput", {"type":"toastInputs"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":"\"Please enter valid Timing\"","targetProperty":"text"}, {}],
wire1: ["wm.Wire", {"expression":"4000","targetProperty":"duration"}, {}],
wire2: ["wm.Wire", {"expression":"\"Warning\"","targetProperty":"cssClasses"}, {}],
wire3: ["wm.Wire", {"expression":"\"center center\"","targetProperty":"dialogPosition"}, {}]
}]
}]
}],
mainLayout: ["wm.Layout", {"horizontalAlign":"center","styles":{},"verticalAlign":"top"}, {}, {
liveForm1: ["wm.LiveForm", {"autoScroll":true,"captionAlign":"left","captionSize":"150px","editorWidth":"80%","enableTouchHeight":true,"height":"100%","horizontalAlign":"left","margin":"10,0,20,0","padding":"10","readonly":true,"styles":{},"verticalAlign":"top"}, {}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"lvVendor","targetProperty":"dataSet"}, {}]
}],
emailEditor1: ["wm.Text", {"border":"0","caption":"Email","captionAlign":"left","captionSize":"150px","changeOnKey":true,"desktopHeight":"26px","emptyValue":"emptyString","formField":"email","height":"26px","maxChars":50,"readonly":true,"showing":false,"width":"80%"}, {}],
addressEditor1: ["wm.Text", {"border":"0","caption":"Address","captionAlign":"left","captionSize":"150px","changeOnKey":true,"desktopHeight":"26px","emptyValue":"emptyString","formField":"address","height":"26px","readonly":true,"width":"80%"}, {}],
activeEditor1: ["wm.Checkbox", {"border":"0","caption":"Active","captionAlign":"left","captionSize":"150px","desktopHeight":"26px","displayValue":false,"formField":"active","height":"26px","readonly":true,"showing":false,"width":"80%"}, {}],
passwordEditor1: ["wm.Text", {"border":"0","caption":"Password","captionAlign":"left","captionSize":"150px","changeOnKey":true,"desktopHeight":"26px","emptyValue":"emptyString","formField":"password","height":"26px","maxChars":50,"readonly":true,"width":"80%"}, {}],
nameEditor1: ["wm.Text", {"border":"0","caption":"Name","captionAlign":"left","captionSize":"150px","changeOnKey":true,"desktopHeight":"26px","emptyValue":"emptyString","formField":"name","height":"26px","maxChars":100,"readonly":true,"required":true,"width":"80%"}, {}],
primaryPhoneEditor1: ["wm.Text", {"border":"0","caption":"Phone","captionAlign":"left","captionSize":"150px","changeOnKey":true,"desktopHeight":"26px","emptyValue":"emptyString","formField":"primaryPhone","height":"26px","maxChars":15,"readonly":true,"regExp":"^[0-9]{10}","required":true,"styles":{},"width":"80%"}, {}],
secondaryPhoneEditor1: ["wm.Text", {"border":"0","caption":"Phone 2","captionAlign":"left","captionSize":"150px","changeOnKey":true,"desktopHeight":"26px","emptyValue":"emptyString","formField":"secondaryPhone","height":"26px","maxChars":15,"mobileHeight":"45px","readonly":true,"regExp":"^[0-9]{10}","singleLine":false,"styles":{},"width":"80%"}, {}],
alternateContactEditor1: ["wm.Text", {"border":"0","caption":"Contact","captionAlign":"left","captionSize":"150px","changeOnKey":true,"desktopHeight":"26px","emptyValue":"emptyString","formField":"alternateContact","height":"26px","maxChars":100,"readonly":true,"width":"80%"}, {}],
ptoEditor1: ["wm.Checkbox", {"border":"0","caption":"Pto","captionAlign":"left","captionSize":"150px","desktopHeight":"26px","deviceSizes":null,"deviceType":null,"displayValue":false,"formField":"pto","height":"26px","readonly":true,"styles":{},"width":"80%"}, {}],
ptoMessageEditor1: ["wm.LargeTextArea", {"border":"0","caption":"Shop Close Message","captionSize":"28px","changeOnKey":true,"desktopHeight":"72px","emptyValue":"emptyString","formField":"ptoMessage","height":"72px","maxChars":100,"mobileHeight":"66px","readonly":true,"styles":{},"width":"80%"}, {}],
ptoMessageEditor2: ["wm.LargeTextArea", {"border":"0","caption":"Order Delivery Message","captionSize":"28px","changeOnKey":true,"desktopHeight":"67px","emptyValue":"emptyString","formField":"vendor_msg","height":"67px","maxChars":100,"mobileHeight":"66px","readonly":true,"width":"80%"}, {}],
minOrderamt: ["wm.Number", {"border":"0","caption":"Minimum Order Amount","captionAlign":"left","captionSize":"150px","changeOnKey":true,"desktopHeight":"26px","emptyValue":"emptyString","formField":"min_order_amount","height":"26px","mobileHeight":"66px","readonly":true,"width":"80%"}, {}],
panel2: ["wm.Panel", {"height":"40px","horizontalAlign":"left","layoutKind":"left-to-right","verticalAlign":"top","width":"100%"}, {}, {
shopTimeTxt: ["wm.Text", {"border":"0","caption":"Shop Time","captionAlign":"left","captionSize":"150px","changeOnKey":true,"desktopHeight":"32px","emptyValue":"emptyString","formField":"shop_time","height":"32px","maxChars":100,"mobileHeight":"66px","readonly":true,"width":"498px"}, {}],
clear_shoptime: ["wm.Button", {"border":"1","caption":"Clear Shoptime","styles":{},"width":"100px"}, {"onclick":"customerUpdateButtonClick"}]
}],
panel4: ["wm.Panel", {"height":"48px","horizontalAlign":"left","layoutKind":"left-to-right","verticalAlign":"middle","width":"100%"}, {}, {
panel3: ["wm.Panel", {"height":"45px","horizontalAlign":"left","layoutKind":"left-to-right","verticalAlign":"middle","width":"530px"}, {}, {
label2: ["wm.Label", {"caption":"Daily Timing 1             --From","height":"30px","padding":"4","width":"192px"}, {}],
optionTimeHour: ["wm.SelectMenu", {"border":"0","caption":"Hr","captionSize":"30px","dataField":"dataValue","dataValue":undefined,"desktopHeight":"26px","displayField":"dataValue","displayValue":"","height":"26px","options":"1,2,3,4,5,6,7,8,9,10,11,12","width":"100px"}, {}],
optionTimeMin: ["wm.SelectMenu", {"border":"0","caption":"Minute","captionSize":"80px","dataField":"dataValue","dataValue":undefined,"desktopHeight":"26px","displayField":"dataValue","displayValue":"","height":"26px","options":"00,15,30,45","width":"150px"}, {}],
option: ["wm.SelectMenu", {"border":"0","caption":"selectMenu1","captionSize":"0px","dataField":"dataValue","dataValue":undefined,"desktopHeight":"26px","displayField":"dataValue","displayValue":"","height":"26px","options":"AM,PM","width":"80px"}, {}]
}],
label1: ["wm.Label", {"caption":"TO","padding":"4","singleLine":false,"width":"40px"}, {}],
panel5: ["wm.Panel", {"desktopHeight":"32px","enableTouchHeight":true,"height":"32px","horizontalAlign":"left","layoutKind":"left-to-right","mobileHeight":"35px","verticalAlign":"middle","width":"348px"}, {}, {
optionTimeHour1: ["wm.SelectMenu", {"border":"0","caption":"Hr","captionSize":"30px","dataField":"dataValue","dataValue":undefined,"desktopHeight":"26px","displayField":"dataValue","displayValue":"","height":"26px","options":"1,2,3,4,5,6,7,8,9,10,11,12","width":"100px"}, {}],
optionTimeMin1: ["wm.SelectMenu", {"border":"0","caption":"Minute","captionSize":"80px","dataField":"dataValue","dataValue":undefined,"desktopHeight":"26px","displayField":"dataValue","displayValue":"","height":"26px","options":"00,15,30,45","width":"150px"}, {}],
option1: ["wm.SelectMenu", {"border":"0","caption":"selectMenu1","captionSize":"0px","dataField":"dataValue","dataValue":undefined,"desktopHeight":"26px","displayField":"dataValue","displayValue":"","height":"26px","options":"AM,PM","width":"80px"}, {}]
}]
}],
panel6: ["wm.Panel", {"height":"48px","horizontalAlign":"left","layoutKind":"left-to-right","verticalAlign":"middle","width":"100%"}, {}, {
panel7: ["wm.Panel", {"desktopHeight":"32px","enableTouchHeight":true,"height":"32px","horizontalAlign":"left","layoutKind":"left-to-right","mobileHeight":"35px","verticalAlign":"top","width":"530px"}, {}, {
label3: ["wm.Label", {"caption":"Daily Timing 2    -- From","height":"30px","padding":"4","width":"192px"}, {}],
optionTimeHour2: ["wm.SelectMenu", {"border":"0","caption":"Hr","captionSize":"30px","dataField":"dataValue","dataValue":undefined,"desktopHeight":"26px","displayField":"dataValue","displayValue":"","height":"26px","options":"1,2,3,4,5,6,7,8,9,10,11,12","width":"100px"}, {}],
optionTimeMin2: ["wm.SelectMenu", {"border":"0","caption":"Minute","captionSize":"80px","dataField":"dataValue","dataValue":undefined,"desktopHeight":"26px","displayField":"dataValue","displayValue":"","height":"26px","options":"00,15,30,45","width":"150px"}, {}],
option2: ["wm.SelectMenu", {"border":"0","caption":"selectMenu1","captionSize":"0px","dataField":"dataValue","dataValue":undefined,"desktopHeight":"26px","displayField":"dataValue","displayValue":"","height":"26px","options":"AM,PM","width":"80px"}, {}]
}],
label4: ["wm.Label", {"caption":"TO","padding":"4","singleLine":false,"width":"40px"}, {}],
panel8: ["wm.Panel", {"desktopHeight":"32px","enableTouchHeight":true,"height":"32px","horizontalAlign":"left","layoutKind":"left-to-right","mobileHeight":"35px","verticalAlign":"top","width":"339px"}, {}, {
optionTimeHour3: ["wm.SelectMenu", {"autoComplete":false,"border":"0","caption":"Hr","captionSize":"30px","dataField":"dataValue","dataValue":undefined,"desktopHeight":"26px","displayField":"dataValue","displayValue":"","height":"26px","options":"1,2,3,4,5,6,7,8,9,10,11,12","width":"100px"}, {}],
optionTimeMin3: ["wm.SelectMenu", {"border":"0","caption":"Minute","captionSize":"80px","dataField":"dataValue","dataValue":undefined,"desktopHeight":"26px","displayField":"dataValue","displayValue":"","height":"26px","options":"00,15,30,45","width":"150px"}, {}],
option3: ["wm.SelectMenu", {"border":"0","caption":"selectMenu1","captionSize":"0px","dataField":"dataValue","dataValue":undefined,"desktopHeight":"26px","displayField":"dataValue","displayValue":"","height":"26px","options":"AM,PM","width":"80px"}, {}]
}]
}],
liveForm1EditPanel: ["wm.EditPanel", {"desktopHeight":"32px","height":"32px","isCustomized":true,"liveForm":"liveForm1","lock":false,"mobileHeight":"45px","operationPanel":"operationPanel1","savePanel":"savePanel1","verticalAlign":"bottom","width":"90%"}, {}, {
savePanel1: ["wm.Panel", {"height":"100%","horizontalAlign":"right","layoutKind":"left-to-right","showing":false,"verticalAlign":"top","width":"100%"}, {}, {
saveButton1: ["wm.Button", {"_classes":{"domNode":["SubmitButton"]},"border":"1","caption":"Save","height":"100%","width":"150px"}, {"onclick":"customerSaveButtonClick"}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"liveForm1EditPanel.formInvalid","targetProperty":"disabled"}, {}]
}]
}],
cancelButton1: ["wm.Button", {"border":"1","caption":"Cancel","height":"100%","width":"150px"}, {"onclick":"liveForm1EditPanel.cancelEdit"}]
}],
operationPanel1: ["wm.Panel", {"height":"100%","horizontalAlign":"center","layoutKind":"left-to-right","verticalAlign":"top","width":"90%"}, {}, {
updateButton1: ["wm.Button", {"border":"1","caption":"Update","height":"100%","width":"150px"}, {"onclick":"customerUpdateButtonClick","onclick1":"liveForm1EditPanel.beginDataUpdate"}, {
binding: ["wm.Binding", {}, {}, {
wire: ["wm.Wire", {"expression":undefined,"source":"liveForm1EditPanel.formUneditable","targetProperty":"disabled"}, {}]
}]
}]
}]
}]
}]
}]
};

DVendorAccountNewPg.prototype._cssText = '';
DVendorAccountNewPg.prototype._htmlText = '';